home *** CD-ROM | disk | FTP | other *** search
/ Network PC / Network PC.iso / amiga utilities / communication / internet / amitcp3.0b / src.lha / src / amitcp / netinet / udp_var.h < prev   
Encoding:
C/C++ Source or Header  |  1996-09-08  |  3.5 KB  |  96 lines

  1. /*
  2.  * $Id: udp_var.h,v 1.3 1993/04/23 00:25:02 ppessi Exp $
  3.  *
  4.  * HISTORY
  5.  * $Log: udp_var.h,v $
  6.  * Revision 1.3  1993/04/23  00:25:02  ppessi
  7.  * Changed statistic variable type into u_long
  8.  *
  9.  * Revision 1.2  93/03/03  20:53:15  20:53:15  jraja (Jarno Tapio Rajahalme)
  10.  * Cleanup. Changed data definitions to declarations, definitions moved to
  11.  * netinet/udp_usrreq.c.
  12.  * 
  13.  * Revision 1.1  92/11/17  16:31:38  16:31:38  jraja (Jarno Tapio Rajahalme)
  14.  * Initial revision
  15.  */
  16.  
  17. /*
  18.  * Copyright (c) 1982, 1986, 1989 Regents of the University of California.
  19.  * All rights reserved.
  20.  *
  21.  * Redistribution and use in source and binary forms, with or without
  22.  * modification, are permitted provided that the following conditions
  23.  * are met:
  24.  * 1. Redistributions of source code must retain the above copyright
  25.  *    notice, this list of conditions and the following disclaimer.
  26.  * 2. Redistributions in binary form must reproduce the above copyright
  27.  *    notice, this list of conditions and the following disclaimer in the
  28.  *    documentation and/or other materials provided with the distribution.
  29.  * 3. All advertising materials mentioning features or use of this software
  30.  *    must display the following acknowledgement:
  31.  *    This product includes software developed by the University of
  32.  *    California, Berkeley and its contributors.
  33.  * 4. Neither the name of the University nor the names of its contributors
  34.  *    may be used to endorse or promote products derived from this software
  35.  *    without specific prior written permission.
  36.  *
  37.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  38.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  39.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  40.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  41.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  42.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  43.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  44.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  45.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  46.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  47.  * SUCH DAMAGE.
  48.  *
  49.  *    @(#)udp_var.h    7.7 (Berkeley) 6/28/90
  50.  */
  51.  
  52. #ifndef UDP_VAR_H
  53. #define UDP_VAR_H
  54.  
  55. /*
  56.  * UDP kernel structures and variables.
  57.  */
  58. struct    udpiphdr {
  59.     struct     ipovly ui_i;        /* overlaid ip structure */
  60.     struct    udphdr ui_u;        /* udp header */
  61. };
  62. #define    ui_next        ui_i.ih_next
  63. #define    ui_prev        ui_i.ih_prev
  64. #define    ui_x1        ui_i.ih_x1
  65. #define    ui_pr        ui_i.ih_pr
  66. #define    ui_len        ui_i.ih_len
  67. #define    ui_src        ui_i.ih_src
  68. #define    ui_dst        ui_i.ih_dst
  69. #define    ui_sport    ui_u.uh_sport
  70. #define    ui_dport    ui_u.uh_dport
  71. #define    ui_ulen        ui_u.uh_ulen
  72. #define    ui_sum        ui_u.uh_sum
  73.  
  74. struct    udpstat {
  75.                 /* input statistics: */
  76.     u_long    udps_ipackets;        /* total input packets */
  77.     u_long    udps_hdrops;        /* packet shorter than header */
  78.     u_long    udps_badsum;        /* checksum error */
  79.     u_long    udps_badlen;        /* data length larger than packet */
  80.     u_long    udps_noport;        /* no socket on port */
  81.     u_long    udps_noportbcast;    /* of above, arrived as broadcast */
  82.     u_long    udps_fullsock;        /* not delivered, input socket full */
  83.     u_long    udpps_pcbcachemiss;    /* input packets missing pcb cache */
  84.                 /* output statistics: */
  85.     u_long    udps_opackets;        /* total output packets */
  86. };
  87.  
  88. #define    UDP_TTL        30    /* default time to live for UDP packets */
  89.  
  90. #ifdef KERNEL
  91. extern struct    inpcb udb;
  92. extern struct    udpstat udpstat;
  93. #endif
  94.  
  95. #endif /* !UDP_VAR_H */
  96.